<?php
$this->headTitle('Quản lý thuộc tính thêm cho thiết bị','append');
?>
<div class="grid_8">
    <div class="box-header">
        Danh sách các thuộc tính thiết bị
        <a class="add" href="<?php echo $this->url(array ('controller' => 'field' ,'action' => 'add')); ?>">Thêm mới</a>
    </div>
    <div class="box table">
        <table cellspacing="0">
        	<thead>
        		<tr>
        			<td class="tc">Tên thuộc tính</td>
        			<td class="tc">Kiểu</td>
        			<td class="tc">Tuỳ chọn</td>
        		</tr>
        	</thead>
        	<tbody>
                <?php foreach ($this->fields as $field){ ?>
                    <tr id="row<?php echo $field->fieldId; ?>">
            			<td><?php echo $this->escape($field->fieldName); ?></td>
            			<td><?php echo $this->escape($field->type); ?></td>
            			<td class="tc">
                            <a href="<?php echo $this->url(array ( 'controller' => 'field' ,'action' => 'edit' , 'id' => $field->fieldId )); ?>">
                                <img src="image/icons/small/icon_edit.png" alt="edit field" border="0"/>
                            </a> 
                            <a href="<?php echo $this->url(array ( 'controller' => 'field' ,'action' => 'delete' , 'id' => $field->fieldId )); ?>">
                                <img src="image/icons/small/icon_delete.png" alt="delete field" border="0"/>
                            </a>
                        </td>
       		       </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
</div>
